package com.zhangdi.dwperms.controller;

import com.zhangdi.dwcommons.enums.ErrorCode;
import com.zhangdi.dwcommons.response.Response;
import com.zhangdi.dwcommons.response.ResponseUtil;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * Created by zhangdi on 2020/01/17 08:47:46.
 */

@Component
public class WarnController {
    @GetMapping("/login")
    public Response login() {
        return ResponseUtil.error(ErrorCode.token);
    }

    @GetMapping("/403")
    public Response unauthz() {
        return ResponseUtil.error(ErrorCode.forbidden);
    }

    @GetMapping("/404")
    public Response notfound() {
        return ResponseUtil.error(ErrorCode.not_found);
    }

    @GetMapping("/500")
    public Response error() {
        return ResponseUtil.error(ErrorCode.error);
    }
}
